package dao;

import java.util.List;

import org.hibernate.Session;

import modele.Unitevente;


import persistence.BaseDAO;

public class UniteventeDAO{
	
	public static void ajouterUnitevente(Unitevente unitevente, Session session) throws Exception{
		BaseDAO.getInstance().ajouter(unitevente,session);
	}

	public static void modifierUnitevente(Unitevente unitevente, Session session) {
		BaseDAO.getInstance().modifier(unitevente,session);
	}

	public static void SupprimerUnitevente(Unitevente unitevente, Session session) {
		BaseDAO.getInstance().delete(unitevente,session);
	}

	public static void getUnitevente(int id, Session session) {
		BaseDAO.getInstance().getObject(Unitevente.class, id,session);
	}

	public static List getListUnitevente(String requette, Session session) {
		return BaseDAO.getInstance().getListObject(requette,session);
	}

	public static List getListUnitevente(String requete, Session session,
			int firstResult, int maxResults) {
		return BaseDAO.getInstance().getLimitedListObject(requete, firstResult, maxResults, session);
	}

}
